package com.webull.information.center.carwler.validator;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Component;

import com.webull.information.center.carwler.common.model.StockConfig;
import com.webull.information.center.carwler.common.model.StockTitle;
import com.webull.information.center.common.constants.CenterCode;
import com.webull.information.center.validator.BaseValidator;

/**
 * 
 * @Description
 * @author smj
 * @Date 下午1:37:49
 * @version jdk1.8
 */
@Component
public class StockerConfigValidator extends BaseValidator {

	protected final Logger logger = LogManager.getLogger(getClass());

	public void validateStockTitle(StockTitle title) {
		validateObjectIsNull(title, CenterCode.PARAM_ERROR, "StockTitle");
		validateObjectIsNull(title.getTickerId(), CenterCode.PARAM_ERROR, "StockTitle");
		validateObjectIsNull(title.getSymbol(), CenterCode.PARAM_ERROR, "StockTitle");
//		validateObjectIsNull(title.getExchangeCode(), CenterCode.PARAM_ERROR, "StockTitle");
	}

	public void validateObjectIsNull(StockConfig obj) {
		validateObjectIsNull(obj, CenterCode.PARAM_ERROR, "StockConfig");
	}

}
